<?php

namespace App\Console\Commands;

use App\Jobs\DeletePaperDataJob;
use App\Service\Gpt\ChatService;
use App\Service\HuoShanAIService;
use App\Service\KimiAIService;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;

class TestChange extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'test:debug';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $key = '45907549-97f4-48ea-85cb-67b7b13a3203';
        $baseUrl = 'https://ark.cn-beijing.volces.com/api/v3/';
        $chatService = new ChatService($key, $baseUrl);
        $info = [
            [
                "type" => "text",
                "text" => "上面的题可能是一道题，你看一下试题答案正确吗？指出错误之处",
            ],
            [
                "type" => "image_url",
                "image_url" => [
                    "url" => "https://free-img.400040.xyz/4/2025/01/11/6781cd94c85dc.jpg",
                ],
            ],
        ];
        //$info='你是谁';
        $chat = [
            "messages" => [
                [
                    "role" => "user",
                    "content" => $info,
                ],
            ],
            "temperature" => 0.6,
            "model" => 'ep-20250111093444-mwd45',
            'extra_headers' => [
                'x-is-encrypted' => true,
            ],
        ];
        $result = $chatService->chat($chat);
        dd($result);
    }
}
